<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
    <title>出单</title>
    <link href="${base}/resource/admin/css/common.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="${base}/resource/admin/js/jquery.js"></script>
    <script type="text/javascript" src="${base}/resource/admin/js/jquery.validate.js"></script>
    <script type="text/javascript" src="${base}/resource/admin/js/common.js"></script>
    <script type="text/javascript" src="${base}/resource/admin/js/input.js"></script>
    <script type="text/javascript" src="${base}/resource/admin/layer/layer.js"></script>
    <script type="text/javascript" src="${base}/resource/admin/js/jquery.jqprint-0.3.js"></script>
    <script type="text/javascript">

        $().ready(function() {
            var $inputForm = $("#inputForm");
            [@flash_message /]
        });
    </script>
</head>
<body>
<div class="path">
    <a href="${base}/admin/common/index.do">首页</a> &raquo;保单详情
</div>
<table class="input tabContent" id="orderContent">
    <tr>
        <td colspan="2" style="color: #CC0000">&nbsp;请将下列信息进行整理,并提供给保险公司。</td>
    </tr>
    <tr>
        <th>
            sn
        </th>
        <td>
        ${entity.sn}
        </td>
    </tr>
    <tr>
        <th>
            金额
        </th>
        <td>
        ${entity.amount}元
        </td>
    </tr>
    <tr>
        <th>
            会员
        </th>
        <td>
            <a href="">${entity.member.username}</a>
        </td>
    </tr>
    <tr>
        <th>
            支付状态
        </th>
        <td>
                    <span class="fieldSet">
                    [#if entity.paymentStatus='unpaid'] 未支付
                    [#elseif entity.paymentStatus='partialPayment']部分支付
                    [#elseif entity.paymentStatus='paid']<span style="color: #CC0000">已支付</span>
                    [#elseif entity.paymentStatus='partialRefunds']部分退款
                    [#elseif entity.paymentStatus='refunded']已退款
                    [/#if]
                    </span>
        </td>
    </tr>
    <tr>
        <th>
            <span class="requiredField">*</span>保单状态
        </th>
        <td>
                    <span class="fieldSet">
                    [#if entity.shippingStatus='unshipped'] 未出单
                    [#elseif entity.shippingStatus='shipped']出单中
                    [#elseif entity.shippingStatus='partialReturns']部分退单
                    [#elseif entity.shippingStatus='returned']出单失败
                    [/#if]
                    </span>
        </td>
    </tr>
    <tr>
        <th>
            <span class="requiredField">*</span>订单状态
        </th>
        <td>
                    <span class="fieldSet">
                    [#if entity.orderStatus='unconfirmed'] 未确认
                    [#elseif entity.orderStatus='confirmed']已确认
                    [#elseif entity.orderStatus='completed']已完成
                    [#elseif entity.orderStatus='cancelled']已取消
                    [/#if]
                    </span>
        </td>
    </tr>
    <tr>
        <th>
            订单附言
        </th>
        <td>
        ${entity.memo}
        </td>
    </tr>
    <tr>
        <td colspan="2">&nbsp;</td>
    </tr>
    <tr>
        <th>
            商品编号
        </th>
        <td>
        ${orderItem.sn}
        </td>
    </tr>
    <tr>
        <th>
            商品名称
        </th>
        <td>
        ${orderItem.name}
        </td>
    </tr>
    <tr>
        <th>
            商品金额
        </th>
        <td>
        ${orderItem.price}
        </td>
    </tr>
    <tr>
        <th>
            <span class="requiredField">*</span>被保险人姓名
        </th>
        <td>
             <span class="fieldSet">
                 <input type="text" name="cName" class="text required" value=" ${orderItem.cName}" maxlength="64" />
             </span>
        </td>
    </tr>
    <tr>
        <th>
            <span class="requiredField">*</span>被保险人身份证
        </th>
        <td>
             <span class="fieldSet">
                 <input type="text" name="cardNo" class="text required" value=" ${orderItem.cardNo}" maxlength="64" />
             </span>
        </td>
    </tr>
    <tr>
        <th>
            <span class="requiredField">*</span>被保险人联系电话
        </th>
        <td>
             <span class="fieldSet">
                 <input type="text" name="cMobile" class="text required" value=" ${orderItem.cMobile}" maxlength="64" />
             </span>
        </td>
    </tr>
    <tr>
        <th>
            <span class="requiredField">*</span>生效日期
        </th>
        <td>
             <span class="fieldSet">
                 <input type="text" name="cBeginDate" class="text required" value=" ${orderItem.cBeginDate}" maxlength="64" />
             </span>
        </td>
    </tr>
    <tr>
        <th>
            被保险人性别
        </th>
        <td>
             <span class="fieldSet">
                 <input type="text" name="cSex" class="text required" value=" ${orderItem.cSex}" maxlength="64" />
             </span>
        </td>
    </tr>
    <tr>
        <th>
            被保险人出生日期
        </th>
        <td>
             <span class="fieldSet">
                 <input type="text" name="cBirthDate" class="text required" value=" ${orderItem.cBirthDate}" maxlength="64" />
             </span>
        </td>
    </tr>
    <tr>
        <th>
            &nbsp;
        </th>
        <td>
            <input type="submit" id="print" class="button" value="打印该页" />
            <input type="submit" id="shipped" class="button" value="确认出单" />
        </td>
    </tr>
</table>


<script type="text/javascript">
    $(function(){

        $("#print").click(function(){
            $("#orderContent").jqprint({
                title:"订单编号"
            });
        });

        $("#shipped").click(function(){
            var url="/order/shippedSubmit?id=${entity.id}";
            layer.alert("请将此订单信息线下递交保险公司进行出单!");
            layer.confirm('确定出单吗?', {
                btn: ['确定','取消'], //按钮
                shade: false //不显示遮罩
            }, function(){
                ajaxToDo(url,function(json){
                    if(json.type=="success"){
                        layer.msg(json.content, {icon: 1});
                        $("#listForm").submit();
                    }else{
                        layer.msg(json.content, {icon: 1});
                    }

                })

            });
        });

    })
</script>
</body>
</html>